<template>
  <div>
    <!-- 三级联动 -->
    <TypeNav />
    <Contain />
    <!-- 今日推荐 -->
    <Recommend />
    <!-- 热卖排行 -->
    <Rank />
    <!-- 猜你喜欢 -->
    <Like />
    <!--  楼层-->
    <Floor v-for="(floor, index) in floorlists" :key="floor.id" :list="floor" />
    <!--  最后一排 品牌展示  -->
    <Brand />
  </div>
</template>

<script>
import Contain from "@/pages/Home/Contain";
import Recommend from "./Recommend";
import Rank from "./Rank";
import Like from "./Like";
import Floor from "./Floor";
import Brand from "./Brand";
import { mapState } from "vuex";
// import { mapMutations, mapState } from "vuex";
export default {
  name: "Home",
  components: { Contain, Recommend, Rank, Like, Floor, Brand },
  computed: {
    ...mapState("home", ["floorlists"]),
  },
  mounted() {
    //!!这里转移到路由中的全局守卫中去派发action了  这里派发的话，如果其中组件没有派发 就没有数据
    // this.$store.dispatch("user/getUserInfo");
  },
};
</script>

<style>
</style>